package com.openvas.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.openvas.mapper.TableScheduleMapper;
import com.openvas.domain.TableSchedule;
import com.openvas.service.ITableScheduleService;
import com.openvas.commons.common.core.text.Convert;

/**
 * 定时Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-11-04
 */
@Service
public class TableScheduleServiceImpl implements ITableScheduleService 
{
    @Autowired
    private TableScheduleMapper tableScheduleMapper;

    /**
     * 查询定时
     * 
     * @param scheduleId 定时主键
     * @return 定时
     */
    @Override
    public TableSchedule selectTableScheduleByScheduleId(String scheduleId)
    {
        return tableScheduleMapper.selectTableScheduleByScheduleId(scheduleId);
    }

    /**
     * 查询定时列表
     * 
     * @param tableSchedule 定时
     * @return 定时
     */
    @Override
    public List<TableSchedule> selectTableScheduleList(TableSchedule tableSchedule)
    {
        return tableScheduleMapper.selectTableScheduleList(tableSchedule);
    }

    /**
     * 新增定时
     * 
     * @param tableSchedule 定时
     * @return 结果
     */
    @Override
    public int insertTableSchedule(TableSchedule tableSchedule)
    {
        return tableScheduleMapper.insertTableSchedule(tableSchedule);
    }

    /**
     * 修改定时
     * 
     * @param tableSchedule 定时
     * @return 结果
     */
    @Override
    public int updateTableSchedule(TableSchedule tableSchedule)
    {
        return tableScheduleMapper.updateTableSchedule(tableSchedule);
    }

    /**
     * 批量删除定时
     * 
     * @param scheduleIds 需要删除的定时主键
     * @return 结果
     */
    @Override
    public int deleteTableScheduleByScheduleIds(String scheduleIds)
    {
        return tableScheduleMapper.deleteTableScheduleByScheduleIds(Convert.toStrArray(scheduleIds));
    }

    /**
     * 删除定时信息
     * 
     * @param scheduleId 定时主键
     * @return 结果
     */
    @Override
    public int deleteTableScheduleByScheduleId(String scheduleId)
    {
        return tableScheduleMapper.deleteTableScheduleByScheduleId(scheduleId);
    }
}
